<?php
$this->breadcrumbs = array(
    'Users',
);

$this->menu = array(
    array('label' => 'Create User', 'url' => array('create'), 'visible' => Yii::app()->user->checkAccess("admin")),
    array('label' => 'Manage User', 'url' => array('admin'), 'visible' => Yii::app()->user->checkAccess("admin")),
);
?>

<h1>Users</h1>


<?php

$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'user-grid',
    'type' => 'striped bordered condensed',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'pager' => array(
        'class' => 'CLinkPager',
    ),
    'template' => "{items}{summary}{pager}",
    'enablePagination' => true,
    'columns' => array(
        array('name' => 'id', 'header' => '#'),
        array('name' => 'first_name', 'header' => 'First name'),
        array('name' => 'username', 'header' => 'User name'),
        array('name' => 'email', 'header' => 'E-mail'),
        array('name' => 'address', 'header' => 'Address'),
        array('name' => 'tele', 'header' => 'telephone No'),
        array('name' => 'role', 'header' => 'role', 'type' => 'raw', 'value' => '$data->role', 'sortable' => true,),
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{view}',
            'htmlOptions' => array('style' => 'width: 50px'),
        ),
    ),
));
?>

